package com.elecbook.content.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.elecbook.base.dto.PageDTO;
import com.elecbook.content.model.dto.*;
import com.elecbook.content.model.po.Comment;
import com.elecbook.content.model.vo.CommentVO;

/**
 * <p>
 * 评论 服务类
 * </p>
 *
 * @author Z-ken
 * @since 2024/11/05 15:50:50
 */
public interface CommentService extends IService<Comment> {

    /**
     * description 提交一个评论
     *
     * @author zken
     * @CreateDate 2024/11/5 17:17:24
     */
    CommentVO submitComment(CommentSubmitDTO dto);

    /**
     * description 分页查询，请求多个comment
     *
     * @author zken
     * @CreateDate 2024/11/5 18:59:59
     */
    PageDTO<CommentVO> queryCommentPage(CommnetPageDTO pageDTO);

    /**
     * description update
     * @author zken
     * @CreateDate 2024/11/19 18:45:15
     */
    Comment updateByDto(CommentUpdateDTO dto);

    /**
     * description 删除
     * @author zken
     * @CreateDate 2024/11/19 18:46:50
     */
    void deleteByDto(CommentUpdateDTO dto);

    //Service新增方法
    PageDTO<Comment> pageQuery(CommentPQuery query);
    Comment saveComment(Comment comment);
    Comment updateCommentById(Comment comment);
}
